package DataStructureAndAlgorithm.AcWing_每日一题.思维题;
//链接：https://www.acwing.com/problem/content/3819/
//思维题 + 前缀和 +　哈希
import java.util.*;

class AcWing_3816{
    static int N = 100010;
    static int[] numsz = new int[N];
    static int[] numsn = new int[N];
    static long[] sums = new long[N];
    static int n ;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();

        for (int k = 0; k < t; k++){
            n = in.nextInt();
            for (int i = 1, j = n ; i <= n && j >= 0; i++,j--){
                int temp = in.nextInt();
                numsz[i] = temp;
                numsn[j] = temp;
            }
            if (check(numsz) || check(numsn)){
                System.out.println("YES");
            }else {
                System.out.println("NO");
            }
        }
        in.close();
    }

    static boolean check(int[] nums){
        for (int i = 1; i <= n; i++){
            sums[i] = sums[i - 1] + nums[i];
        }
        //如果总和为奇数，则不可能分成和相等的两部分
        if (sums[n] % 2 == 1)return false;

        HashSet<Long> set = new HashSet<>();
        set.add((long)0);

        for (int i = 1; i <= n; i++){
            set.add((long)nums[i]);
            if (set.contains(sums[i] - sums[n] / 2)){
                return true;
            }
        }
        return false;
    }
}